#include "StdAfx.h"
#include "DisplayAbnormalDetection.h"


DisplayAbnormalDetection::DisplayAbnormalDetection(void)
: Detection( )
{
}

DisplayAbnormalDetection::~DisplayAbnormalDetection(void)
{
}

bool DisplayAbnormalDetection::dAdetect( IplImage * src ,  IplImage * marked , vector<Abnormality*>  & abnorm_list, int lower, int upper ) 
{
	display_abnormal = cvAvg( src ) ;
	if( display_abnormal.val[0] > lower && display_abnormal.val[0]<upper )
	{
		is_abnormal = true ;
		cvRectangleR( marked , cvRect( 0 , 0 , src->width  , src->height ) ,  CV_RGB(255,0,0) , 12 ) ;
		return true ;
	}
	else
	{
		return false ;
	}
}
